package com.yiwei.jmx.api.bean;

import android.text.TextUtils;

import com.yiwei.jmx.util.ToastUtil;

/**
 * Created by xsooy-pc on 18-7-6.
 */

public class IncomeCarBean {


    /**
     * carno_prefix : 粤s
     * carno : 666KK
     * carbrand : 沃尔沃
     * car_type : 新车
     * province : 广东
     * city : 东莞
     * driving_image : https://lanhuapp.com/2017/12/12/201712121857293237.jpg
     * identity_image : https://lanhuapp.com/2017/12/12/201712121857293237.jpg
     * car_image : https://lanhuapp.com/2017/12/12/201712121857293237.jpg
     */

    public String carno_prefix;
    public String carno;
    public String carbrand;
    public String car_type;
    public String province;
    public String city;
    public String driving_image;
    public String identity_image;
    public String car_image;

    public boolean checkAll() {
        if (TextUtils.isEmpty(carno_prefix)) {
            ToastUtil.makeTipsText("车牌地区前缀不能为空");
            return false;
        }
        if (TextUtils.isEmpty(carbrand)) {
            ToastUtil.makeTipsText("品牌不能为空");
            return false;
        }
        if (TextUtils.isEmpty(car_type)) {
            ToastUtil.makeTipsText("车辆属性不能为空");
            return false;
        }
        if (TextUtils.isEmpty(province)) {
            ToastUtil.makeTipsText("归属城市不能为空");
            return false;
        }
        if (TextUtils.isEmpty(driving_image)) {
            ToastUtil.makeTipsText("行驶证照片不能为空");
            return false;
        }
        if (TextUtils.isEmpty(identity_image)) {
            ToastUtil.makeTipsText("驾驶证照片不能为空");
            return false;
        }
        if (TextUtils.isEmpty(car_image)) {
            ToastUtil.makeTipsText("车辆正面照不能为空");
            return false;
        }
        return true;
    }
}
